﻿namespace WLFramework.Validation
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;


    public abstract class ValidateBaseAttribute : Attribute
    {
        private string _errorMessage;
        public string ErrorMessage { get { return _errorMessage; } set { _errorMessage = value; } }

        private string _helpMessage;
        public string HelpMessage { get { return _helpMessage; } set { _helpMessage = value; } }

        protected ValidateBaseAttribute() { }
        protected ValidateBaseAttribute(string errorMessage) :this(errorMessage, null) { }
        protected ValidateBaseAttribute(string errorMessage, string helpMessage) 
        {
            this._errorMessage = errorMessage;
            this._helpMessage = helpMessage;
        }

        public abstract ValidateResult IsValid(ValidationContext context);
    }
}
